<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<link rel="icon" href="assets/images/logo.png" />
		<title>成果转化</title>
		<link rel="stylesheet" href="assets/libs/layui/css/layui.css" />
		<link rel="stylesheet" href="assets/module/admin.css" />
		<link rel="stylesheet" href="assets/module/formSelects/formSelects-v4.css" />
		<link rel="stylesheet" href="assets/module/city-picker/city-picker.css" />
		<link rel="stylesheet" type="text/css" href="assets/libs/zTree/css/metroStyle/metroStyle.css">
		<link rel="stylesheet" type="text/css" href="assets/libs/zTree/css/zTreeStyle/zTreeStyle.css">
		<link rel="stylesheet" type="text/css" href="assets/css/my_input.css">
	</head>
	<body class="layui-layout-body">
		<div class="layui-layout layui-layout-admin">
			<!-- 头部 -->
			<div class="layui-header">
				<div class="layui-logo">
<!--					<img src="assets/images/logo.png" width="70%"/>-->
					<h2 style="color: white; font-weight: 400;font-style: oblique;letter-spacing: 3px;">成果转化</h2>
				</div>
				<ul class="layui-nav layui-layout-left">
					<!--<li class="layui-nav-item" lay-unselect id="show_back">
						<a id="comeback" title="返回"><i class="layui-icon layui-icon-prev"></i></a>
					</li>-->
					<li class="layui-nav-item" lay-unselect>
						<a ew-event="flexible" title="侧边伸缩"><i class="layui-icon layui-icon-shrink-right"></i></a>
					</li>
					<li class="layui-nav-item" lay-unselect>
						<a ew-event="refresh" title="刷新"><i class="layui-icon layui-icon-refresh-3"></i></a>
					</li>
				</ul>
				<ul class="layui-nav layui-layout-right">
					<li class="layui-nav-item layui-hide-xs" lay-unselect>
						<a ew-event="fullScreen" title="全屏"><i class="layui-icon layui-icon-screen-full"></i></a>
					</li>
					<li class="layui-nav-item" lay-unselect>
						<a style="display: inline;">
							<img src="assets/images/head.png" class="layui-nav-img">
							<cite id="huName"></cite>
						</a>
						<dl class="layui-nav-child">
							<dd lay-unselect><a id="user_center">个人中心</a></dd>
							<dd lay-unselect><a ew-event="psw">修改密码</a></dd>
							<hr>
							<dd lay-unselect><a ew-event="logout">退出</a></dd>
						</dl>
					</li>
					<li class="layui-nav-item" lay-unselect>
						<a ew-event="theme" title="设置"><i class="layui-icon layui-icon-more-vertical"></i></a>
					</li>
				</ul>
			</div>
			<!-- 侧边栏 -->
			<div class="layui-side">
				<div class="layui-side-scroll">
					<ul class="layui-nav layui-nav-tree" lay-accordion="true" lay-filter="admin-side-nav" style="margin-top: 15px;">
					</ul>
				</div>
			</div>
			<!-- 主体部分 -->
			<div class="layui-body"></div>
		</div>

		<!-- 侧边栏渲染模板 -->
		<script id="sideNav" type="text/html">
			{{#  layui.each(d, function(index, item){ }}
			<li class="layui-nav-item">
				<a href="{{item.url}}"><i class="layui-icon {{item.icon}}"></i>&emsp;<cite>{{ item.name}}</cite></a>
				{{# if(item.subMenus&&item.subMenus.length>0){ }}
				<dl class="layui-nav-child">
					{{# layui.each(item.subMenus, function(index, subItem){ }}
					<dd>
						<a href="{{ subItem.url }}">{{ subItem.name }}</a>

						{{# if(subItem.subMenus&&subItem.subMenus.length>0){ }}
						<dl class="layui-nav-child">
							{{# layui.each(subItem.subMenus, function(index, thrItem){ }}
							<dd>
								<a href="{{ thrItem.url }}">{{ thrItem.name }}</a>

								{{# if(thrItem.subMenus&&thrItem.subMenus.length>0){ }}
								<dl class="layui-nav-child">
									{{# layui.each(thrItem.subMenus, function(index, fourItem){ }}
									<dd>
										<a href="{{ fourItem.url }}">{{ fourItem.name }}</a>

										{{# if(fourItem.subMenus&&fourItem.subMenus.length>0){ }}
										<dl class="layui-nav-child">
											{{# layui.each(fourItem.subMenus, function(index, fiveItem){ }}
											<dd>
												<a href="{{ fiveItem.url }}">{{ fiveItem.name }}</a>
											</dd>
											{{# }); }}
										</dl>
										{{# } }}

									</dd>
									{{# }); }}
								</dl>
								{{# } }}

							</dd>
							{{# }); }}
						</dl>
						{{# } }}
					</dd>
					{{# }); }}
				</dl>
				{{# } }}
			</li>
			{{#  }); }}
		</script>

		<!-- 加载动画 -->
		<div class="page-loading">
			<div class="ball-loader">
				<span></span><span></span><span></span><span></span>
			</div>
		</div>

		<!-- js部分 -->
		<script type="text/javascript" src="assets/libs/layui/layui.js"></script>
		<script type="text/javascript" src="assets/js/config.js"></script>
		<script type="text/javascript" src="assets/js/main.js"></script>
		<script type="text/javascript" src="assets/libs/echarts/echarts.min.js"></script>
		<!-- 省市区级联 -->
		<script type="text/javascript" src="assets/js/area.js"></script>
		<script type="text/javascript" src="assets/js/xm-select.js"></script>
		<!-- 地图 -->
		<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=60ecd8ee0a04bc6772f5ce0fd5f3643c"></script>
		<script src="https://a.amap.com/jsapi_demos/static/demo-center/js/demoutils.js"></script>
		<script type="text/html" id="managerForm">
			<form lay-filter="managerForm" class="layui-form model-form">
				<input name="user_id" type="hidden"/>
				<div class="layui-form-item">
					<label class="layui-form-label">账号</label>
					<div class="layui-input-block">
						<input name="username" placeholder="请输入账号" type="text" class="layui-input"
							   maxlength="20" lay-verify="required" required/>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">用户名</label>
					<div class="layui-input-block">
						<input name="true_name" placeholder="请输入用户名" type="text" class="layui-input"
							   maxlength="20" lay-verify="required" required/>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">手机号</label>
					<div class="layui-input-block">
						<input name="phone" placeholder="请输入手机号" type="text" class="layui-input"
							   lay-verify="required|phone" required/>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">性别</label>
					<div class="layui-input-block">
						<input type="radio" name="sex" value="男" title="男" checked/>
						<input type="radio" name="sex" value="女" title="女"/>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">注册时间</label>
					<div class="layui-input-block">
						<input name="create_time" placeholder="请输入手机号" type="text" class="layui-input"
							   disabled/>
					</div>
				</div>
			</form>
		</script>
		<script>
            layui.use(['layer', 'config','admin', 'form'], function () {
                var $ = layui.jquery;
                var layer = layui.layer;
                var config = layui.config;
                var admin = layui.admin;
                var form = layui.form;

                var userInfo = config.getUser();

                $('#comeback').click(function () {
                    window.history.go(-1);
				});
                admin.events.logout = function () {
                    $.get(serverUrlAdmin + 'User/logout.html',{
						token:config.getToken()
					}, function (res) {
                        layer.closeAll('loading');
                        console.log(res);
                        if (res.success) {
                            config.putToken(null);
                            config.putUser(null);
                            layer.msg('退出成功', {icon: 1, time: 1500}, function () {
                                location.replace('login.html');
                            });
                        } else {
                            layer.msg(res.msg, {icon: 5});
                        }
                    }, 'json');
                    return false;
                };

                $('#user_center').click(function () {
                    admin.open({
                        type: 1,
                        area: '500px',
                        offset: '65px',
                        title:  '个人中心',
                        content: $('#managerForm').html(),
                        success: function (layero, index) {
                            $(layero).children('.layui-layer-content').css('overflow', 'visible');
                            form.render();
                            if (userInfo) {
                                form.val('managerForm', userInfo);
                                form.render()
                            }
                        }
                    });
                });

				form.verify({
					numberDh: function(value, item){
						var reg = /^[0-9]+(,[0-9]+)*$/; // 正则表达式，匹配数字和逗号
						if(!reg.test(value)){
							return '请输入正确的金额';
						}
					},
					positiveNumber:[/^(([0-9]+[\.]?[0-9]+)|[1-9])$/,'请输入正确的数字'],
					wholeNumber:[/^[+]{0,1}(\d+)$/,'请输入正确的数字'],
				});

            })
		</script>
	</body>
</html>
